#!/bin/sh
#desc:Calendar
#package:odchronos
#type:local

# Copyright(c) 2011 OpenDomo Services SL. Licensed under GPL v3 or later

if test -z "$1"; then
	# Without params, we take the current month and year
	MONTH=`date +%m`
	YEAR=`date +%Y`
else
	MONTH=`echo $1|cut -f1 -d'-'`
	YEAR=`echo $1|cut -f2 -d'-'`
fi

echo "list:showCalendarDay.sh"
for DAY in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do
	wd=`date --date=$YEAR-$MONTH-$DAY +%A` 2>/dev/null
	if test $? -eq 0; then
		echo "	$DAY-$MONTH-$YEAR	$DAY	day	$wd"
	fi
done
echo
